<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>个人中心</title>
    <link rel="stylesheet" href="/dev/plugins/layui/layui/css/layui.css">
    <link rel="stylesheet" href="/dev/plugins/bootstrap/css/bootstrap.css">
    <link rel="stylesheet" href="/dev/assets/css/job/page/myuserinfo.css">
    <link rel="icon" href="/dev/assets/img/geek-job/wanli.jpg" type="image/x-icon">
    <script>
        e();
        function e () {
            // 在这里执行条件检查
            let token = localStorage.getItem("token")
            if (token==null) {
                // 执行页面跳转
                window.location.href = '/dev/views/job/page/login.html';
            }
        }
    </script>
</head>

<body>
<div id="nav"></div>
<div id="wrap" class="page-geek-recommend has-header has-footer">
    <div id="main" class="inner home-inner" headerrander="true">
        <div id="container" class="ucenter-container user-center-wrapper">
            <div class="user-jobs-area">
                <div class="jobs-from-system clearfix">
                    <div class="system-search-condition">
                        <div class="job-search-box clearfix">
                            <div class="job-search-form"><span ka="switch_city_dialog_open"
                                                               class="city-label">苏州</span>
                                <div class="search-input-box">
                                    <div class="input-wrap input-wrap-text"><input autocomplete="on"
                                                                                                 spellcheck="false" type="text" placeholder="搜索职位、公司"
                                                                                                 class="input"><!----><!----><!----><!----></div><!---->
                                </div><a href="javascript:;" class="search-btn">搜索</a>
                            </div>
                        </div>
                        <div class="expect-select"><span class="label">期望</span>
                            <div data-v-68b7cfce="" class="expect-select-wrapper"><span data-v-68b7cfce=""
                                                                                        class="current-text has-tooltip" data-original-title="null">Java（苏州）</span>
                                <ul data-v-68b7cfce="" class="expect-list">
                                    <li data-v-68b7cfce=""
                                        class="expect-item active has-tooltip" data-original-title="null"> Java（苏州）
                                    </li>
                                </ul>
                            </div><a href="/dev/views/job/page/resume.html" class=""
                                     type="desktop"> 添加期望职位 </a>
                        </div>
                        <div class="filter-select-box clearfix">
                            <div class="city-area-select">
                                <div class="city-area-current"><i class="ui-icon-location"></i><span
                                        class="area-current-text">苏州</span></div>
                                <div class="city-area-dropdown">
                                    <ul class="city-area-tab">
                                        <li ka="job_filter_tab_city" class="active">城市和区域</li>
                                        <li ka="job_filter_tab_subway" class="">地铁</li>
                                    </ul><!---->
                                    <div class="area-dropdown-item">
                                        <div class="area-select-wrapper">
                                            <div class="area-select-container">
                                                <ul class="dropdown-area-list">
                                                    <li>不限</li>
                                                    <li ka="sel-business-0" class="">常熟市<!----></li>
                                                    <li ka="sel-business-1" class="">姑苏区<!----></li>
                                                    <li ka="sel-business-2" class="">虎丘区<!----></li>
                                                    <li ka="sel-business-3" class="">昆山市<!----></li>
                                                    <li ka="sel-business-4" class="">苏州工业园区<!----></li>
                                                    <li ka="sel-business-5" class="">太仓市<!----></li>
                                                    <li ka="sel-business-6" class="">吴江区<!----></li>
                                                    <li ka="sel-business-7" class="">吴中区<!----></li>
                                                    <li ka="sel-business-8" class="">相城区<!----></li>
                                                    <li ka="sel-business-9" class="">张家港市<!----></li>
                                                </ul>
                                            </div><!---->
                                        </div>
                                    </div><!---->
                                </div><!---->
                            </div><!---->
                            <div class="condition-filter-select">
                                <div class="current-select"><span class="placeholder-text">工作经验</span><!----></div>
                                <div class="filter-select-dropdown" style="display: none;">
                                    <ul>
                                        <li ka="sel-personal-sel-exp-0" class="">不限<i class="ui-icon-check"></i>
                                        </li>
                                        <li ka="sel-personal-sel-exp-108" class="">在校生<i class="ui-icon-check"></i>
                                        </li>
                                        <li ka="sel-personal-sel-exp-102" class="">应届生<i class="ui-icon-check"></i>
                                        </li>
                                        <li ka="sel-personal-sel-exp-103" class="">1年以内<i class="ui-icon-check"></i>
                                        </li>
                                        <li ka="sel-personal-sel-exp-104" class="">1-3年<i class="ui-icon-check"></i>
                                        </li>
                                        <li ka="sel-personal-sel-exp-105" class="">3-5年<i class="ui-icon-check"></i>
                                        </li>
                                        <li ka="sel-personal-sel-exp-106" class="">5-10年<i
                                                class="ui-icon-check"></i>
                                        </li>
                                        <li ka="sel-personal-sel-exp-107" class="">10年以上<i
                                                class="ui-icon-check"></i>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                            <div data-v-366681a5="" class="salary-filter-select">
                                <div data-v-366681a5="" class="current-select"><span data-v-366681a5=""
                                                                                     class="placeholder-text">薪资待遇</span><!----></div>
                                <div data-v-366681a5="" class="filter-select-dropdown" style="display: none;">
                                    <ul data-v-366681a5="">
                                        <li data-v-366681a5="" ka="sel-personal-sel-salary-" class=""> 不限<!----><i
                                                data-v-366681a5="" class="ui-icon-check"></i></li>
                                        <li data-v-366681a5="" ka="sel-personal-sel-salary-402" class="">
                                            3K以下<!----><i data-v-366681a5="" class="ui-icon-check"></i></li>
                                        <li data-v-366681a5="" ka="sel-personal-sel-salary-403" class="">
                                            3-5K<!----><i data-v-366681a5="" class="ui-icon-check"></i></li>
                                        <li data-v-366681a5="" ka="sel-personal-sel-salary-404" class="">
                                            5-10K<!----><i data-v-366681a5="" class="ui-icon-check"></i></li>
                                        <li data-v-366681a5="" ka="sel-personal-sel-salary-405" class="">
                                            10-20K<!----><i data-v-366681a5="" class="ui-icon-check"></i></li>
                                        <li data-v-366681a5="" ka="sel-personal-sel-salary-406" class="">
                                            20-50K<!----><i data-v-366681a5="" class="ui-icon-check"></i></li>
                                        <li data-v-366681a5="" ka="sel-personal-sel-salary-407" class="">
                                            50K以上<!----><i data-v-366681a5="" class="ui-icon-check"></i></li>
                                    </ul>
                                </div>
                            </div><!---->
                            <div class="condition-filter-select">
                                <div class="current-select"><span class="placeholder-text">学历要求</span><!----></div>
                                <div class="filter-select-dropdown" style="display: none;">
                                    <ul>
                                        <li ka="sel-personal-sel-degree-0" class="">不限<i class="ui-icon-check"></i>
                                        </li>
                                        <li ka="sel-personal-sel-degree-209" class="">初中及以下<i
                                                class="ui-icon-check"></i>
                                        </li>
                                        <li ka="sel-personal-sel-degree-208" class="">中专/中技<i
                                                class="ui-icon-check"></i>
                                        </li>
                                        <li ka="sel-personal-sel-degree-206" class="">高中<i
                                                class="ui-icon-check"></i>
                                        </li>
                                        <li ka="sel-personal-sel-degree-202" class="">大专<i
                                                class="ui-icon-check"></i>
                                        </li>
                                        <li ka="sel-personal-sel-degree-203" class="">本科<i
                                                class="ui-icon-check"></i>
                                        </li>
                                        <li ka="sel-personal-sel-degree-204" class="">硕士<i
                                                class="ui-icon-check"></i>
                                        </li>
                                        <li ka="sel-personal-sel-degree-205" class="">博士<i
                                                class="ui-icon-check"></i>
                                        </li>
                                    </ul>
                                </div>
                            </div>
                            <div class="condition-filter-select">
                                <div class="current-select"><span class="placeholder-text">公司规模</span><!----></div>
                                <div class="filter-select-dropdown" style="display: none;">
                                    <ul>
                                        <li ka="sel-personal-sel-scale-301" class="">0-20人<i
                                                class="ui-icon-check"></i>
                                        </li>
                                        <li ka="sel-personal-sel-scale-302" class="">20-99人<i
                                                class="ui-icon-check"></i>
                                        </li>
                                        <li ka="sel-personal-sel-scale-303" class="">100-499人<i
                                                class="ui-icon-check"></i></li>
                                        <li ka="sel-personal-sel-scale-304" class="">500-999人<i
                                                class="ui-icon-check"></i></li>
                                        <li ka="sel-personal-sel-scale-305" class="">1000-9999人<i
                                                class="ui-icon-check"></i></li>
                                        <li ka="sel-personal-sel-scale-306" class="">10000人以上<i
                                                class="ui-icon-check"></i></li>
                                    </ul>
                                </div>
                            </div>
                            <div class="condition-filter-select">
                                <div class="current-select"><span class="placeholder-text">融资情况</span><!----></div>
                                <div class="filter-select-dropdown" style="display: none;">
                                    <ul>
                                        <li ka="sel-personal-sel-stage-0" class="">不限<i class="ui-icon-check"></i>
                                        </li>
                                        <li ka="sel-personal-sel-stage-801" class="">未融资<i
                                                class="ui-icon-check"></i>
                                        </li>
                                        <li ka="sel-personal-sel-stage-802" class="">天使轮<i
                                                class="ui-icon-check"></i>
                                        </li>
                                        <li ka="sel-personal-sel-stage-803" class="">A轮<i class="ui-icon-check"></i>
                                        </li>
                                        <li ka="sel-personal-sel-stage-804" class="">B轮<i class="ui-icon-check"></i>
                                        </li>
                                        <li ka="sel-personal-sel-stage-805" class="">C轮<i class="ui-icon-check"></i>
                                        </li>
                                        <li ka="sel-personal-sel-stage-806" class="">D轮及以上<i
                                                class="ui-icon-check"></i>
                                        </li>
                                        <li ka="sel-personal-sel-stage-807" class="">已上市<i
                                                class="ui-icon-check"></i>
                                        </li>
                                        <li ka="sel-personal-sel-stage-808" class="">不需要融资<i
                                                class="ui-icon-check"></i>
                                        </li>
                                    </ul>
                                </div>
                            </div><span class="empty-filter">清空筛选条件</span>
                        </div><!---->
                    </div>
                    <div class="job-tab"><span ka="rcmd_job_list" class="current">精选职位</span><span ka="new_job_list"
                                                                                                       class="">最新职位</span></div>
                    <div class="job-list-wrapper">

                    </div>
                    <div id="demo-laypage-all"></div>
                </div>
            </div>
            <div class="user-sider">
                <div>
                    <div data-v-7d3f5d0c="" class="sider-box userinfo-box">
                        <div data-v-7d3f5d0c="" class="container">
                            <div data-v-7d3f5d0c="" class="headbox">
                                <div data-v-7d3f5d0c="" class="sex man"></div><img data-v-7d3f5d0c=""
                                                                                   src="https://img.bosszhipin.com/boss/avatar/avatar_15.png" alt=""
                                                                                   class="headimg">
                            </div>
                            <div data-v-7d3f5d0c="" class="content">
                                <div data-v-7d3f5d0c="" class="username"><span data-v-7d3f5d0c=""
                                                                               class="username">赵建云</span><span data-v-7d3f5d0c=""
                                                                                                                   class="icon-vip-upgrade"><span data-v-7d3f5d0c="">升级VIP</span></span></div>
                                <div data-v-7d3f5d0c="" class="userinfo"> 23岁 <i data-v-7d3f5d0c=""
                                                                                  class="vline"></i>
                                    24年应届生 <i data-v-7d3f5d0c="" class="vline"></i> 本科 </div>
                            </div>
                        </div>
                        <div data-v-7d3f5d0c="" class="btn-ops">
                            <div data-v-7d3f5d0c="" class="now-state">
                                <div data-v-7d3f5d0c="" class="ui-select ui-select-single" style="width: 100%;">
                                    <div tabindex="0" class="ui-select-selection"><input type="hidden" value="1">
                                        <div class="ui-select-inner"><span
                                                class="ui-select-selected-value">在校-暂不考虑</span><i
                                                class="ui-icon-arrow-down"></i></div>
                                    </div>
                                    <div class="ui-select-dropdown" style="display: none;">
                                        <ul class="ui-dropdown-not-found" style="display: none;">
                                            <li>无匹配数据</li>
                                        </ul>
                                        <ul class="ui-dropdown-list">
                                            <li data-v-7d3f5d0c="" class="ui-select-item">离校-随时到岗</li>
                                            <li data-v-7d3f5d0c="" class="ui-select-item ui-select-item-selected">
                                                在校-暂不考虑</li>
                                            <li data-v-7d3f5d0c="" class="ui-select-item">在校-考虑机会</li>
                                            <li data-v-7d3f5d0c="" class="ui-select-item">在校-月内到岗</li>
                                        </ul>
                                        <ul class="ui-dropdown-loading" style="display: none;">加载中</ul>
                                    </div>
                                </div>
                            </div><a data-v-7d3f5d0c="" href="javascript:;"
                                     class="edit-userinfo"  type="desktop" lay-on="page-title">编辑</a>
                        </div>
                        <div data-v-7d3f5d0c="" class="user-stat"><a data-v-7d3f5d0c=""
                                                                     href="/dev/views/job/page/jobfromchat.html?page=1" class=""
                                                                     type="desktop"><b data-v-7d3f5d0c="">8</b>沟通过 </a><a data-v-7d3f5d0c=""
                                                                                                                             href="/dev/views/job/page/jobfromchat.html?page=2" class=""
                                                                                                                              type="desktop"><b data-v-7d3f5d0c="">0</b>已投递 </a><a
                                data-v-7d3f5d0c="" href="/dev/views/job/page/jobfromchat.html?page=3" class=""
                                 type="desktop"><b data-v-7d3f5d0c="">0</b>面试 </a><a
                                data-v-7d3f5d0c="" href="/dev/views/job/page/jobfromchat.html?page=4" class=""
                                 type="desktop"><b data-v-7d3f5d0c="">0</b>感兴趣 </a>
                        </div>
                    </div>
                    <div data-v-c28f1a02="">
                        <div data-v-c28f1a02="" class="sider-box resume-online">
                            <h3 data-v-c28f1a02="" class="title">在线简历</h3>
                            <div data-v-c28f1a02="" class="edit-container"><a data-v-c28f1a02=""
                                                                              href="/dev/views/job/page/resume.html" class="edit" type="desktop">编辑</a>
                                <div data-v-c28f1a02="" class="arrow"></div>
                            </div>
                        </div><!---->
                    </div><!---->

                </div>

            </div>
        </div>
    </div>
</div>
</div>
<script src="/dev/plugins/jquery/jquery.min.js"></script>
<script src="/dev/plugins/layui/layui/layui.js"></script>
<script src="/dev/plugins/bootstrap/js/bootstrap.js"></script>
<script>
    $(".search-btn").click(function (){
        search()
    })
    function search(){
        let input = $(".input").val()
        console.log(input)
        $.ajax({
            headers:{
                "id":localStorage.getItem("id"),
                "token":localStorage.getItem("token")
            },
            url:'/dev/UserExp/geekRecommend',
            type:'get',
            data:{"searchkey":input},
            success:function(postlist){
                console.log(postlist)
                let number = postlist.data.length
                let page = [1,4]
                layui.use(function(){
                    var laypage = layui.laypage;
                    // 完整显示
                    laypage.render({
                        elem: 'demo-laypage-all', // 元素 id
                        count: number, // 数据总数
                        limit:4,
                        limits:[4,8,10],
                        layout: ['count', 'prev', 'page', 'next', 'limit', 'refresh', 'skip'], // 功能布局
                        jump: function(obj){
                            console.log(obj);
                            page[0]=obj.curr
                            page[1]=obj.limit
                            strs = ""
                            for (let i = (page[0]-1)*page[1];i<(page[0]-1)*page[1]+page[1];i++){
                                if (postlist.data[i]==null){
                                    break
                                }
                                strs+=`<div class="search-job-result">
                            <ul class="job-list-box">
                                <li  class="job-card-wrapper">
                                    <div class="job-card-body clearfix"><a
                                            href="#"
                                             target="_blank" class="job-card-left job-card-left-1" onclick="conn(${postlist.data[i].postId})">
                                        <div class="job-title clearfix"><span
                                                class="job-name">${postlist.data[i].posName}</span><span
                                                class="job-area-wrapper"><span
                                                class="job-area">${postlist.data[i].workPlace}</span></span></div>
                                    </a>
                                        <div class="job-info clearfix"><a
                                                href="#" target="_blank"
                                                class="job-card-left job-card-left-2"><span class="salary">${Math.round(postlist.data[i].payFloor/1000)}-${Math.round(postlist.data[i].payUpper/1000)}K</span>
                                            <ul class="tag-list">
                                                <li>${postlist.data[i].ageDemand}</li><!----><!---->
                                                <li>${postlist.data[i].specialty}</li>
                                            </ul>
                                            <div class="info-public">${postlist.data[i].jrName}<em>${postlist.data[i].jrType}</em></div>
                                        </a >
<!--                                            <a href=" " ka="cpc_job_list_chat_0"-->
<!--                                               class="start-chat-btn">立即沟通</a >-->

                                            <div class="job-card-right">
                                                <div class="company-logo"><a
                                                        href="#"><img src="${postlist.data[i].jrAvatar}"></a >
                                                </div>
                                                <div class="company-info">
                                                    <h3 class="company-name"><a
                                                            href="#" target="_blank">${postlist.data[i].companyName}</a><!----></h3>
                                                    <ul class="company-tag-list">
                                                        <li>${postlist.data[i].companyType}</li><!---->
                                                        <li>${postlist.data[i].employeesQuantity}</li>
                                                    </ul>
                                                </div>
                                            </div>

                                        </div><!---->


                                    </div>
                                    <div class="job-card-footer clearfix">
                                        <ul class="tag-list">
                                            <li>JavaScript</li>
                                        </ul>
                                        <div class="info-desc"></div>
                                    </div>
                                </li>
                            </ul>
                        </div>`
                            }
                            document.getElementsByClassName("job-list-wrapper")[0].innerHTML=strs
                        }
                    });
                });
            }
        })
    }
</script>
<script>
    $(function (){
        $("#nav").load("/dev/views/common/nav.html")
        search()
        let cont = document.querySelector(".content")
        $.ajax({
            headers:{
                "id":localStorage.getItem("id"),
                "token":localStorage.getItem("token")
            },
            url:"/dev/collect/num",
            type:"post",
            data:{"jsId":localStorage.getItem("id")},
            success:function (result){
                if (result.code==200){
                    let user = document.querySelector(".user-stat")
                    user.children[0].innerHTML=`<b data-v-7d3f5d0c="">${result.data.addNum}</b>沟通过`
                    user.children[1].innerHTML=`<b data-v-7d3f5d0c="">${result.data.submitNum}</b>已投递`
                    user.children[2].innerHTML=`<b data-v-7d3f5d0c="">${result.data.interviewNum}</b>面试`
                    user.children[3].innerHTML=`<b data-v-7d3f5d0c="">${result.data.interestNum}</b>感兴趣`
                }
            }
        })
        $.ajax({
            headers:{
                "id":localStorage.getItem("id"),
                "token":localStorage.getItem("token")
            },
            url:'/dev/collect/userInfo',
            type: 'post',
            data:{
                // "jsId": localStorage.getItem("userId")
                "jsId": localStorage.getItem("id")
            },
            success:function (result){
                if (result.code==200){
                    console.log("个人数据")
                    console.log(result)
                    document.querySelector(".headimg").src=result.data.avatar
                    cont.innerHTML=`<div data-v-7d3f5d0c="" class="username"><span data-v-7d3f5d0c=""
                                                               class="username">${result.data.jsName}</span></div>
                <div data-v-7d3f5d0c="" class="userinfo"> ${result.data.age}
              </div>`
                }
            }
        })
        let expect = document.querySelector(".expect-list");
        let position = document.querySelector("[ka=\"target_position_474157162\"]")
        $.ajax({
            headers:{
                "id":localStorage.getItem("id"),
                "token":localStorage.getItem("token")
            },
            url: "/dev/intention/hope",
            type: "get",
            data: {
                jsId: localStorage.getItem("id")
            },
            success:function (result){
                console.log(result)
                if (result.code==200){
                    let str = ``
                    for (let i=0;i<result.data.length;i++){
                        str+=`<li data-v-68b7cfce="" ka="target_position_474157162"
                                        class="expect-item active has-tooltip" data-original-title="null"> ${result.data[i]}（苏州）
                                    </li>`
                    }
                    expect.innerHTML=str
                }else {
                    expect.innerHTML=''
                }
            }
        })

    })

    function con(nums){
        // localStorage.setItem("postId",num);
        window.location=`/dev/views/job/page/jobdetails.html?jrId=${nums}`;
    }
    function conn(num){
        // localStorage.setItem("postId",num);
        window.location=`/dev/views/job/page/boss.html?posId=${num}`;
    }



    layui.use(function(){
        var $ = layui.$;
        var layer = layui.layer;
        var util = layui.util;
        var form = layui.form;
        // 事件
        util.on('lay-on', {
            'page-title': function(){
                layer.open({
                    type: 1,
                    area: ['630px', '569px'], // 宽高
                    title: false, // 不显示标题栏
                    closeBtn: 0,
                    skin: "compileJS",
                    shadeClose: true, // 点击遮罩关闭层
                    content: '<iframe src="/dev/views/common/mycompile.html" frameborder="0" style="width: 630px;height: 560px;border-radius: 10px"></iframe>',
                    end: function (){
                        location.reload()
                    }
                });
            }

        })
    });
</script>
</body>

</html>